<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>用户管理</title>
    <link rel="stylesheet" href="{_STATIC_PATH}component/pear/css/pear.css"/>
    <style>

    </style>
</head>
<body class="pear-container">
<div class="layui-card">
    <div class="layui-card-body">
        <table id="log-table" lay-filter="user-table"></table>
    </div>
</div>
<script src="{_STATIC_PATH}component/layui/layui.js"></script>
<script src="{_STATIC_PATH}component/pear/pear.js"></script>
<script>
    layui.use(['table', 'form', 'jquery', 'common'], function () {
        let table = layui.table;
        let form = layui.form;
        let $ = layui.jquery;
        let common = layui.common;

        let MODULE_PATH = "operate/";

        let cols = [
            [{
                type: 'checkbox'
            },
                {
                    title: 'id',
                    field: 'id',
                    align: 'center',
                    width: 100
                },
                {
                    title: '用户ID',
                    field: 'user_id',
                    align: 'center'
                },
                {
                    title: '操作页面',
                    field: 'page',
                    align: 'center'
                },
                {
                    title: '操作ip',
                    field: 'ip',
                    align: 'center',
                },
                {
                    title: '提交数据',
                    field: 'data',
                    align: 'center',
                },
                {
                    title: '浏览器标示',
                    field: 'agent',
                    align: 'center',
                },
                {
                    title: '操作时间',
                    field: 'create_time',
                    align: 'center',
                }
            ]
        ]

        table.render({
            elem: '#log-table',
            url: '/admin/log/json',
            page: true,
            cols: cols,
            skin: 'line',
            toolbar: '#user-toolbar',
            defaultToolbar: [{
                title: '刷新',
                layEvent: 'refresh',
                icon: 'layui-icon-refresh',
            }, 'filter', 'print', 'exports']
        });

    })
</script>
</body>
</html>
